<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/common/taglibs.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<title><s:text name="投票结果统计"/></title>
	<%@ include file="/common/meta.jsp"%>
	<%@ include file="/common/common.jsp"%>
	<script type="text/javascript" src="${ctx}/js/vote.js"></script>
	
</head>
<body>
<s:hidden name="arr" id="arr"></s:hidden>
<div id="wrapper">
	<div id="main_box">
	<div class="curmb"><s:text name="your.site.position"/>:<s:text name="投票结果查看"/></div>
		<table class="searchTable">
			<td>投票主题：</td>
			<td class="c_36c"><s:property value="vot.voteTitle"/></td>
			<td>投票状态：</td>
			<td class="cf00"><s:if test="vot.voteStatus = 1">启用</s:if><s:else>禁用</s:else></td>
			<td>投票人数：</td>
			<td class="cf00"><s:property value="optNum"/></td>
			<td>创建人：</td>
			<td class="c_36c"><s:property value="vot.createRealName"/></td>
		</table>
		<div class="listoperate" id="listoperate">
	    <span class="space20"></span>
		     <a href="#" id="zt" class="alinkscurrent"><s:text name="总体结果"/></a>|
		     <a href="#" id="jl" class="alinks"><s:text name="投票记录" /> </a>
		</div>
			<div id="ztjg">
				<div class="line_1 mlr20 p20 mb10">
					<h1 class="c024ca2 center f16"><s:property value="vot.voteTitle"/></h1>
					<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<s:property value="vot.describe"/></p>
				</div>
				<div class="mlr20">
				已有<span style="color:red"><s:property value="optNum"/></span>人参与投票
					<div id="vote"></div>
				</div>
			</div>
			<div id="tpjl" style="display: none">
				<br/>
				<table class="listgrid" id="adrr">
					<tr>
						<th>编号</th>
						<th>投票人</th>
						<th>投票项</th>
						<th>地区</th>
						<th>Ip</th>
						<th>投票时间</th>
					</tr>
					<s:iterator value="page2.result" status="st">
						<tr>
							<td class="ord"><s:property value="#st.index+1"/></td>
							<td><s:property value="voteUserName"/>&nbsp;</td>
							<td><s:property value="%{getOptionName(voteOption.voteOptionId)}"/></td>
							<td>
								<script src="http://www.92cha.com/iptxt.aspx?out=js&ip=<s:property value="voteIp"/>" type="text/javascript" language="javascript"></script>
							</td>
							<td><s:property value="voteIp"/>&nbsp;</td>
							<td><s:property value="createTime"/>&nbsp;</td>
						</tr>
					</s:iterator>
				</table>
			</div>
			<br/>
			<div>
				<table>
					<td align="center">
						<input type="button" value="返回" class="btnlist4" onclick="history.go(-1);">
					</td>
				</table>
			</div>
	</div>
</div>

</body>
</html>
<script type="text/javascript" defer="defer">
//投票结果比例图显示
	var arr = $("#arr").val();
	$$.vote("#vote",arr);

	//基本信息、附件配置信息切换
 	$("#zt").click(function(){
 		$("#jl").removeClass("alinkscurrent").addClass("alinks");
 		$("#zt").removeClass("alinks").addClass("alinkscurrent");
 		
 		$("#ztjg").css("display",'block');
 		$("#tpjl").css("display",'none');
 		
 	})
 	$("#jl").click(function(){
 		$("#jl").removeClass("alinks").addClass("alinkscurrent");
 		$("#zt").removeClass("alinkscurrent").addClass("alinks");
 	
 		$("#ztjg").css("display",'none');
 		$("#tpjl").css("display",'block');
 	})

 	var earr = $$.g("#adrr a");
 	for ( var j = 0; j < earr.length; j++) {
 		//alert(earr[j].href);
 		earr[j].href="#";
		
	}
 	
</script>